#include "cmethod.h"

CMethod::CMethod(QObject *parent) : CObject(parent)
{
//    m_id = KInvalidId;
    m_description = KNullString;
    m_picture = KNullString;
    m_recipe_id = KInvalidId;
    m_step = KInvalidId;
    m_cost_time = 0;
}

//int CMethod::id() {
//    return m_id;
//}

//void CMethod::setId(int id) {
//    if (m_id != id) {
//        m_id = id;
//        emit idChanged();
//    }
//}

int CMethod::recipeId() {
    return m_recipe_id;
}

void CMethod::setRecipeId(int recipeId) {
    if (m_recipe_id != recipeId) {
        m_recipe_id = recipeId;
        emit recipeIdChanged();
    }
}

int CMethod::step() {
    return m_step;
}

void CMethod::setStep(int step) {
    if (m_step != step) {
        m_step = step;
        emit stepChanged();
    }
}

QString CMethod::description() {
    return m_description;
}

void CMethod::setDescription(QString description) {
    if (m_description != description) {
        m_description = description;
        emit descriptionChanged();
    }
}

int CMethod::costTime() {
    return m_cost_time;
}

void CMethod::setCostTime(int costTime) {
    if (m_cost_time != costTime) {
        m_cost_time = costTime;
        emit costTimeChanged();
    }
}

QString CMethod::picture() {
    return m_picture;
}

void CMethod::setPicture(QString picture) {
    if (m_picture != picture) {
        m_picture = picture;
        emit pictureChanged();
    }
}
